from pydantic import BaseModel, EmailStr
from typing import Optional
import datetime


class CreateUser(BaseModel):
    email: str
    password: str


class UserLogin(BaseModel):
    email: str
    password: str


class Token(BaseModel):
    access_token: str
    token_type: str


class DataToken(BaseModel):
    id: Optional[str] = None


class UserOutput(BaseModel):
    email: EmailStr
    id: str
    created_at: datetime.datetime

    class Config:
        orm_mode = True
